package com.nbjtjc.safe.api.edu;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.nbjtjc.safe.annotation.SysLog;
import com.nbjtjc.safe.bean.Result;
import com.nbjtjc.safe.model.edu.EduDailyNotify;
import com.nbjtjc.safe.model.edu.EduRequirementInvestigation;
import com.nbjtjc.safe.model.edu.EduRequirementRespondent;
import com.nbjtjc.safe.model.sys.SysNotice;
import com.nbjtjc.safe.service.edu.EduDailyNotifyService;
import com.nbjtjc.safe.service.sys.SysNoticeService;
import com.nbjtjc.safe.util.MyShiroUtils;

import cn.hutool.core.util.ObjectUtil;

@RestController
@CrossOrigin("*")
@RequestMapping("/eduDailyNotify")
public class EduDailyNotifyController {
	@Autowired
	private EduDailyNotifyService eduDailyNotifyService;
	@Autowired
	private SysNoticeService sysNoticeService;

	  @RequestMapping(value = "/addOrUpdate",method = {RequestMethod.POST})
	  @SysLog("添加或更新日常培训通知信息")
	    public Result add(@RequestBody EduDailyNotify eduDailyNotify){
	        Result result=new Result();
	        try {
	            result=eduDailyNotifyService.add(eduDailyNotify);
	        } catch (Exception e) {
	            e.printStackTrace();
	            result.setFalse(e.getMessage());
	        }
	        return result;
	    }
}
